package com.village.friend.service.impl;

import com.village.friend.entity.ActivityJoin;
import com.village.friend.mapper.ActivityJoinMapper;
import com.village.friend.service.ActivityJoinService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 活动报名表 服务实现类
 * </p>
 *
 * @author yl
 * @since 2021-11-13
 */
@Service
public class ActivityJoinServiceImpl extends ServiceImpl<ActivityJoinMapper, ActivityJoin> implements ActivityJoinService {
    @Override
    public Integer insertOrUpdate(Integer activityId, Integer userId, Integer userIdJoin, Integer isJoin) {
        return baseMapper.insertOrUpdate(activityId, userId, userIdJoin, isJoin);
    }

    @Override
    public Integer insertOrUpdateAgree(Integer activityId, Integer userId, Integer userIdJoin, Integer isAgree) {
        return baseMapper.insertOrUpdateAgree(activityId, userId, userIdJoin, isAgree);
    }

    @Override
    public List<ActivityJoin> getJoinList(Integer activityId, Integer offset, Integer limit) {
        return baseMapper.getJoinList(activityId, offset, limit);
    }

    @Override
    public Integer getJoinCount(Integer id) {
        return baseMapper.getJoinCount(id);
    }
}
